package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.INewsFragmentContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.getArcticByIdResponse;
import com.clouddot.baipai.http.entity.response.getArcticListResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import rx.Observable;

public class NewsFragmentModel extends BaseModelImpl implements INewsFragmentContract.IModel {
    public NewsFragmentModel(Context context) {
        super(context);

    }

    @Override
    public Observable<getArcticListResponse> getArcticList(String acttype, String type, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getArcticeInfo(Env.getAppContext().IP,acttype,type,pageindex,pagesize);
    }

    @Override
    public Observable<getArcticByIdResponse> getArcticById(String acttype, String id) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getArcticById(Env.getAppContext().IP,acttype,id);
    }


}
